import styles from './index.css';
import classnames from 'classnames';
import {Link,useNavigate} from 'umi';//react-router-dom import all from umi
function Home(){
  //使用导入的自定义hook useNavigate得到一个导航方法或者说跳转路径的方法 navigate
  const navigate = useNavigate();
  return (
    <div className={classnames(styles.title, styles.background)}>
        <h1>首页2</h1>
        <Link to="/profile">个人中心</Link>
        <button onClick={()=>navigate('/user')}>跳转到用户管理</button>
    </div>
  )
}
export default Home;